home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global background, HiderSpr, level, levelSpr, aCharacterInfo, firstCharacterSpr, lBack, tBack, rBack, bBack, gNumber, gNumber2, groupRoster, numCharacters, numChar, hiderX, hiderY, CardSpr, timerWait, answer, counterSpr, SceneSpr, spriteInAction, arrowSpr, extraHiderSpr, attempts, numCorrect, nextSound, idleStr, numCorrect4Lev2, numCorrect4Lev3, CountString, SelectedAnswers, correctCounter2, numWrong, lastWrongAnswer, kprefPath, gMac, capObj
- append(the searchPath, kprefPath & "hknumber\")
- if the machineType = 256 then
- set gMac to 0
- else
- set gMac to 1
- end if
- makeAFolder("hkNumber")
- if gMac then
- if objectp(capObj) then
- capObj(mdispose)
- end if
- set capObj to maketemplate(mnew)
- else
- if objectp(capObj) then
- set capObj to capObj(mdispose)
- end if
- set capObj to Draw(mnew)
- end if
- set background to 2
- set HiderSpr to 3
- set CardSpr to 19
- set levelSpr to 5
- set firstCharacterSpr to 6
- set counterSpr to 21
- set extraHiderSpr to 20
- set arrowSpr to 22
- set SceneSpr to 23
- set CountString to EMPTY
- set SelectedAnswers to EMPTY
- set hiderX to 256
- set hiderY to 227
- puppetSprite(background, 1)
- puppetSprite(CardSpr, 1)
- puppetSprite(levelSpr, 1)
- puppetSprite(arrowSpr, 1)
- puppetSprite(counterSpr, 1)
- puppetSprite(SceneSpr, 1)
- puppetSprite(extraHiderSpr, 1)
- set str to getGameLevel()
- if stringp(str) then
- set level to integer(word 1 of str)
- if (level < 1) or (level > 3) then
- set level to 1
- end if
- if level > 1 then
- takeOffArrows()
- end if
- set numCorrect4Lev2 to integer(word 2 of str)
- set numCorrect4Lev3 to integer(word 3 of str)
- if level = 2 then
- set numCorrect to numCorrect4Lev2
- end if
- if level = 3 then
- set numCorrect to numCorrect4Lev3
- end if
- if not integerp(numCorrect) or (numCorrect < 0) then
- set numCorrect to 0
- end if
- set lastWrongAnswer to numCorrect
- else
- set level to 1
- set numCorrect4Lev2 to 0
- set numCorrect4Lev3 to 0
- set numCorrect to 0
- set lastWrongAnswer to 0
- end if
- set correctCounter2 to 0
- set numWrong to 0
- set the castNum of sprite levelSpr to the number of cast ("level" & (level * 2) - 1)
- set numCharacters to "0 0 0"
- set numChar to 0
- set answer to 0
- set attempts to 0
- set nextSound to EMPTY
- set lBack to the left of sprite background
- set tBack to the top of sprite background
- set rBack to the right of sprite background
- set bBack to the bottom of sprite background
- set the immediate of sprite levelSpr to 1
- put " " into field "Entry"
- set the textSize of field "Entry" to 24
- set the textStyle of field "Entry" to "bold"
- set timerWait to 0
- set n to 3
- if random(3) = 1 then
- set n to random(2)
- end if
- NewScene(n, 1)
- setGroup(3)
- initCard()
- set idleStr to EMPTY
- end
-
- on idle
- global idleStr
- do(idleStr)
- end
-
- on stopMovie
- global level, idleStr, numCorrect4Lev2, numCorrect4Lev3, numCorrect, returningFromMovie, gameLevels, capObj, gMac, oldColDepth, kPCflag, kCDvol, kprefPath
- set the searchPath to []
- set idleStr to EMPTY
- if level = 2 then
- set numCorrect4Lev2 to numCorrect
- end if
- if level = 3 then
- set numCorrect4Lev3 to numCorrect
- end if
- set level to 1
- set str to level && numCorrect4Lev2 && numCorrect4Lev3
- setGameLevel(str)
- if gMac then
- if objectp(capObj) then
- capObj(mdispose)
- end if
- else
- if objectp(capObj) then
- set capObj to capObj(mdispose)
- end if
- end if
- set g to gameLevels
- set o to oldColDepth
- set pc to kPCflag
- set cd to kCDvol
- set p to kprefPath
- clearGlobals()
- set gameLevels to g
- set oldColDepth to o
- set kPCflag to pc
- set kCDvol to cd
- set kprefPath to p
- set returningFromMovie to 1
- unLoad()
- end
-
- on NewScene n, noSoundFlag
- global scene, background, groupRoster, gNumber, gName, gName2, numChar, numCharacters
- set scene to n
- setSceneButton()
- set groupRoster to item scene of "apple bird bunny,bubble flower mush,duck bfly rose"
- set gNumber to random(3)
- set gName to word gNumber of groupRoster
- set numCharacters to "0 0 0"
- set numChar to 0
- defaultBackground()
- set the castNum of sprite background to the number of cast ("Scene" & scene)
- if not integerp(noSoundFlag) then
- playSound("MagicAppearance", 1)
- end if
- end
-
- on changeGroup n
- global gNumber
- set g to gNumber
- set g to g + n
- if g > 3 then
- set g to 1
- end if
- if g < 1 then
- set g to 3
- end if
- setGroup(g)
- end
-
- on setGroup n
- global numCharacters, gName, gNumber, numChar, groupRoster
- put numChar into word gNumber of numCharacters
- set gNumber to n
- set gName to word gNumber of groupRoster
- set numChar to value(word gNumber of numCharacters)
- end
-
- on doEquation
- global numChar, SelectedAnswers, level
- set desiredSum to getEquation()
- if level = 2 then
- set count to 0
- repeat while (numChar = desiredSum) or (SelectedAnswers contains " " & desiredSum)
- set desiredSum to getEquation()
- set count to count + 1
- if count > 20 then
- set SelectedAnswers to EMPTY
- exit repeat
- end if
- end repeat
- put " " & desiredSum after SelectedAnswers
- end if
- if desiredSum < numChar then
- Subtraction(desiredSum)
- else
- Addition(desiredSum)
- end if
- end
-
- on getEquation
- global numCorrect, numChar
- set arg1 to 3
- if numCorrect < 3 then
- set base to 0
- end if
- if (numCorrect >= 3) and (numCorrect < 9) then
- set base to 3
- end if
- if numCorrect >= 9 then
- set base to 6
- set arg1 to 4
- end if
- set desiredSum to numChar
- repeat while desiredSum = numChar
- set desiredSum to random(arg1) + base
- if (random(3) = 1) and (base > 0) then
- set desiredSum to random(base + arg1)
- end if
- if desiredSum > 10 then
- set desiredSum to 10
- end if
- end repeat
- return desiredSum
- end
-
- on Addition desiredSum
- global level, numChar, gNumber, numCharacters, addSubSign, randomSet, lastEquation, CountString
- set CountString to EMPTY
- set addSubSign to "Addition"
- set r to desiredSum - numChar
- bringCharacter(r)
- put numChar into word gNumber of numCharacters
- go(label("level" & level) + 1)
- end
-
- on Subtraction desiredSum
- global level, numChar, gNumber, numCharacters, addSubSign, lastEquation
- set addSubSign to "Addition"
- set r to numChar - desiredSum
- set tryCounter to 0
- set thisEquation to numChar - r && r && numChar
- repeat while thisEquation = lastEquation
- set r to random(numChar - 1)
- set thisEquation to numChar - r && r && numChar
- set tryCounter to tryCounter + 1
- if tryCounter > 30 then
- Addition()
- exit
- end if
- end repeat
- takeAwayCharacter(r)
- put numChar into word gNumber of numCharacters
- go(label("level" & level) + 1)
- end
-
- on bringCharacter num
- global numChar, firstCharacterSpr, gName, spriteInAction, CountString
- set loopBegin to numChar + 1
- set loopEnd to numChar + num
- if loopEnd > 10 then
- set loopEnd to 10
- end if
- if loopBegin > 10 then
- set loopBegin to 10
- end if
- puppetSound(0)
- repeat with i = loopBegin to loopEnd
- set CountString to EMPTY
- set spriteInAction to firstCharacterSpr + i - 1
- play frame gName & i & "Enter"
- puppetSprite(firstCharacterSpr + i - 1, 1)
- set numChar to numChar + 1
- end repeat
- grabBackground()
- set spriteInAction to 0
- turncharactersoff()
- end
-
- on takeAwayCharacter num
- global numChar, firstCharacterSpr, tempGlobalUsage, gName, spriteInAction, CountString
- set beginLoop to numChar + 1
- puppetSound(0)
- repeat with i = 1 to num
- set CountString to EMPTY
- set j to beginLoop - i
- set tempGlobalUsage to j
- set spriteInAction to 11 - j + firstCharacterSpr - 1
- play frame gName & j & "Out"
- makeCharInvisible(j)
- set numChar to numChar - 1
- end repeat
- grabBackground()
- removehider()
- set spriteInAction to 0
- turncharactersoff()
- end
-
- on makeCharInvisible i
- global firstCharacterSpr, gNumber, gName, hiderX, hiderY
- set Sprt to firstCharacterSpr + 10 - i
- puppetSprite(Sprt, 1)
- set the castNum of sprite Sprt to the number of cast (gName & i & ".erase")
- set the locH of sprite Sprt to hiderX
- set the locV of sprite Sprt to hiderY
- updateStage()
- end
-
- on grabBackground
- global scene, lBack, tBack, rBack, bBack
- captureArea("Scene" & scene, lBack, tBack, rBack, bBack)
- end
-
- on defaultBackground
- global scene
- set the picture of cast ("Scene" & scene) to the picture of cast ("Scene" & scene & "Default")
- end
-
- on captureArea cName, l, t, r, b
- global capObj, kprefPath, gMac
- if gMac then
- set the picture of cast cName to capObj(mStageToCast, l, t, r, b)
- else
- set capturePath to kprefPath & "hknumber\capture.dib"
- set result to capObj(mStageToDIB, capturePath, l, t, r, b)
- set result to LoadDIBIntoCast(capturePath, cName)
- end if
- end
-
- on LoadDIBIntoCast fileName, cName
- set cNum to the number of cast cName
- if cNum = -1 then
- alert(QUOTE & cName & QUOTE & " cast not found")
- end if
- set cPal to the palette of cast cNum
- set cScript to the scriptText of cast cNum
- set the fileName of cast "linked pic" to fileName
- set the picture of cast cNum to the picture of cast "linked pic"
- set result to 1
- if the castType of cast cNum <> #bitmap then
- alert("Error loading bitmap :" & fileName)
- move(cast "empty bitmap", cast cNum)
- set result to 0
- end if
- return result
- end
-
- on hidecharacter characterNum
- global HiderSpr, hiderX, hiderY, gName
- puppetSprite(HiderSpr, 1)
- set the castNum of sprite HiderSpr to the number of cast (gName & characterNum & ".erase")
- set the locH of sprite HiderSpr to hiderX
- set the locV of sprite HiderSpr to hiderY
- updateStage()
- end
-
- on clearTheDecks
- global counterSpr
- puppetSprite(24, 0)
- turncharactersoff()
- when keyDown then nothing
- set the castNum of sprite 16 to the number of cast "standard kitty"
- set the locH of sprite 16 to 417
- set the locV of sprite 16 to 297
- set the locH of sprite counterSpr to -256
- set the locH of sprite 4 to -256
- puppetSprite(4, 0)
- set the locH of sprite 17 to -256
- set the locH of sprite 18 to -256
- removehider()
- removeextrahider()
- if the castNum of sprite 19 = the number of cast "answerHold" then
- set the locH of sprite 19 to 276 - 512
- set the locV of sprite 19 to 45
- end if
- end
-
- on removehider
- global HiderSpr
- set the locH of sprite HiderSpr to -300
- updateStage()
- puppetSprite(HiderSpr, 0)
- end
-
- on hide cName
- global HiderSpr, hiderX, hiderY, gName
- puppetSprite(HiderSpr, 1)
- set the castNum of sprite HiderSpr to the number of cast cName
- set the locH of sprite HiderSpr to hiderX
- set the locV of sprite HiderSpr to hiderY
- updateStage()
- end
-
- on eraseCharacters
- global HiderSpr, hiderX, hiderY, gName
- puppetSprite(HiderSpr, 1)
- set the trails of sprite HiderSpr to 1
- repeat with i = 1 to 10
- set the castNum of sprite HiderSpr to the number of cast (gName & i & ".erase")
- set the locH of sprite HiderSpr to hiderX
- set the locV of sprite HiderSpr to hiderY
- updateStage()
- end repeat
- set the trails of sprite HiderSpr to 0
- end
-
- on resetStage
- global firstCharacterSpr
- repeat with i = 1 to 10
- set C to firstCharacterSpr + i - 1
- if the castNum of sprite C then
- set the locH of sprite C to -512
- puppetSprite(C, 0)
- end if
- end repeat
- updateStage()
- end
-
- on FlipCard toStr
- global gName, CardSpr
- set cName to the name of cast the castNum of sprite CardSpr
- if not stringp(toStr) then
- set toStr to EMPTY
- end if
- if cName = "NumberCard" then
- if toStr contains "Number" then
- return 0
- end if
- set flipStr to "NumberFlip.1,NumberFlip.2,CardFlip.2,CardFlip.1," & gName & "Card"
- else
- if toStr = "CardToCard" then
- set flipStr to "CardFlip.1,CardFlip.2,revCardFlip.2,revCardFlip.1," & gName & "Card"
- else
- if toStr contains "Card" then
- return 0
- end if
- set flipStr to "CardFlip.1,CardFlip.2,NumberFlip.2,NumberFlip.1,NumberCard"
- end if
- end if
- puppetSound("cardFlip")
- repeat with i = 1 to the number of items in flipStr
- set fStr to item i of flipStr
- set the castNum of sprite CardSpr to the number of cast fStr
- updateStage()
- wait(3)
- end repeat
- return 1
- end
-
- on getcardCharacter
- global CardSpr
- set cName to the name of cast the castNum of sprite CardSpr
- set cardChar to char 1 to offset("card", cName) - 1 of cName
- return cardChar
- end
-
- on hideCardSpr
- global CardSpr
- if the locH of sprite CardSpr > 0 then
- set the locH of sprite CardSpr to the locH of sprite CardSpr - 512
- end if
- end
-
- on showCardSpr
- global CardSpr
- if the locH of sprite CardSpr < 0 then
- set the locH of sprite CardSpr to the locH of sprite CardSpr + 512
- end if
- end
-
- on initCard
- global CardSpr, gName
- set the castNum of sprite CardSpr to the number of cast (gName & "Card")
- end
-
- on formatName str, num
- set dispName to EMPTY
- if not integerp(num) then
- set num to 2
- end if
- if num = 1 then
- if str = "bunny" then
- set dispName to "bunny"
- end if
- if str = "apple" then
- set dispName to "apple"
- end if
- if str = "bird" then
- set dispName to "bird"
- end if
- if str = "mush" then
- set dispName to "mushroom"
- end if
- if str = "bubble" then
- set dispName to "bubble"
- end if
- if str = "flower" then
- set dispName to "flower"
- end if
- if str = "duck" then
- set dispName to "duck"
- end if
- if str = "bfly" then
- set dispName to "butterfly"
- end if
- if str = "rose" then
- set dispName to "flower"
- end if
- else
- if str = "bunny" then
- set dispName to "bunnies"
- end if
- if str = "apple" then
- set dispName to "apples"
- end if
- if str = "bird" then
- set dispName to "birds"
- end if
- if str = "mush" then
- set dispName to "mushrooms"
- end if
- if str = "bubble" then
- set dispName to "bubbles"
- end if
- if str = "flower" then
- set dispName to "flowers"
- end if
- if str = "duck" then
- set dispName to "ducks"
- end if
- if str = "bfly" then
- set dispName to "butterflies"
- end if
- if str = "rose" then
- set dispName to "flowers"
- end if
- end if
- return dispName
- end
-
- on turnOnCharacter num
- global firstCharacterSpr, gName
- turncharactersoff()
- play frame label("All" & gName) + num - 1
- repeat with i = 1 to num
- puppetSprite(firstCharacterSpr + i - 1, 1)
- end repeat
- end
-
- on countCharacters
- global firstCharacterSpr, numChar, counterSpr, CountString
- turnOnCharacter(numChar)
- if CountString <> EMPTY then
- set str to CountString
- else
- set str to " " & firstCharacterSpr & " "
- repeat with i = 2 to numChar
- set n1 to firstCharacterSpr + i - 1
- set flag to 0
- repeat with j = 1 to the number of words in str
- set n2 to value(word j of str)
- if the left of sprite n1 < the left of sprite n2 then
- put " " & n1 & " " before word j of str
- set flag to 1
- exit repeat
- end if
- end repeat
- if flag = 0 then
- put " " & n1 & " " after str
- end if
- end repeat
- end if
- CountDisplay(str)
- set the locH of sprite counterSpr to -256
- updateStage()
- end
-
- on CharacterDance
- global gName, numChar, firstCharacterSpr
- turnOnCharacter(numChar)
- hide(gName & "10.cover")
- repeat with i = 1 to numChar
- set C to firstCharacterSpr + i - 1
- if the name of cast the castNum of sprite C contains "bunny1" then
- set the castNum of sprite C to the number of cast "bunny1.1"
- end if
- end repeat
- updateStage()
- repeat with i = 1 to numChar
- set C to firstCharacterSpr + i - 1
- if the name of cast the castNum of sprite C contains "bunny1" then
- set the castNum of sprite C to the number of cast "bunny1.2"
- end if
- end repeat
- updateStage()
- repeat with i = 1 to numChar
- set C to firstCharacterSpr + i - 1
- if the name of cast the castNum of sprite C contains "bunny1" then
- set the castNum of sprite C to the number of cast "bunny1.1"
- end if
- end repeat
- updateStage()
- removehider()
- turncharactersoff()
- end
-
- on getCenter C
- set l to the left of sprite C
- set t to the top of sprite C
- set r to the right of sprite C
- set b to the bottom of sprite C
- set x to l + ((r - l) / 2)
- set y to t + ((b - t) / 2)
- return x && y
- end
-
- on CountDisplay str
- global counterSpr, exitRepeat, level
- repeat with i = 1 to the number of words in str
- set spr to value(word i of str)
- set x to the left of sprite spr + 10
- set y to the top of sprite spr - 8
- if y < 5 then
- set y to the bottom of sprite spr + 8
- end if
- set the castNum of sprite counterSpr to the number of cast ("num" & i)
- set the locH of sprite counterSpr to x
- set the locV of sprite counterSpr to y
- updateStage()
- sayNum(i)
- end repeat
- end
-
- on hiliteOn spr
- set the ink of sprite spr to 32
- updateStage()
- end
-
- on hiliteOff spr
- set the ink of sprite spr to 8
- updateStage()
- end
-
- on getSprInfo start, num
- set str to EMPTY
- repeat with i = start to start + num - 1
- set cName to the name of cast the castNum of sprite i
- set x to the locH of sprite i
- set y to the locV of sprite i
- set str to str & cName & "," & x & "," & y & RETURN
- end repeat
- put str
- end
-
- on turncharactersoff
- global firstCharacterSpr
- repeat with i = 1 to 10
- set spr to firstCharacterSpr + i - 1
- if the locH of sprite spr > 0 then
- set the locH of sprite spr to -256
- end if
- puppetSprite(spr, 0)
- end repeat
- end
-
- on spritesOff
- repeat with i = 1 to 27
- puppetSprite(i, 0)
- end repeat
- end
-
- on formatInput
- global nextSound
- set n to the number of chars in field "Entry"
- if ((the key = RETURN) or (the key = ENTER)) and (n > 0) then
- dontPassEvent()
- when keyDown then nothing
- set the locH of sprite 4 to -256
- updateStage()
- checkAnswer(value(field "Entry"))
- exit
- end if
- if ((the key < "0") or (the key > "9") or (n = 2)) and (the key <> BACKSPACE) then
- dontPassEvent()
- end if
- set nextSound to EMPTY
- end
-
- on checkAnswer userInput
- global answer, level, scene, attempts, numCorrect, gName, gName2, lastWrongAnswer, gNumber2, numCharacters, numChar, numWrong, SelectedAnswers, correctCounter2
- if userInput = answer then
- set yeeyWord to item random(10) of "Correct,Excellent,Fantastic,Very Good,You Are Wonderful,Fabulous,Good Going,Good Job,That Was Great,Nice Counting"
- if level = 2 then
- put yeeyWord & "!" into field "display"
- else
- put RETURN & yeeyWord & "!" into field "display2"
- end if
- puppetSprite(24, 1)
- if level = 2 then
- playSound(yeeyWord, 1)
- play frame gName & "Corrects"
- else
- captureArea("answerHold", 375, 18, 435, 57)
- set x to the locH of sprite 19
- set y to the locV of sprite 19
- set C to the castNum of sprite 19
- set the castNum of sprite 19 to the number of cast "answerHold"
- set the locH of sprite 19 to 405
- set the locV of sprite 19 to 37
- playSound(yeeyWord, 1)
- play frame gName & "Corrects"
- set oldgName to gName
- set oldnumChar to numChar
- set numChar to integer(word gNumber2 of numCharacters)
- set gName to gName2
- play frame gName2 & "Corrects"
- set gName to oldgName
- set numChar to oldnumChar
- set the locH of sprite 19 to x
- set the locV of sprite 19 to y
- set the castNum of sprite 19 to C
- end if
- puppetSprite(24, 0)
- set attempts to 0
- removehider()
- set numCorrect to numCorrect + 1
- if (numCorrect - lastWrongAnswer) >= 3 then
- set numWrong to 0
- end if
- set correctCounter2 to correctCounter2 + 1
- if correctCounter2 >= 10 then
- set correctCounter2 to 0
- ChangeLevel(1)
- end if
- go("level" & level)
- else
- set attempts to attempts + 1
- if (attempts = 3) and (level > 1) then
- set attempts to 0
- set numWrong to numWrong + 1
- set lastWrongAnswer to numCorrect
- put EMPTY into word the number of words in SelectedAnswers of SelectedAnswers
- go(level & "ShowAnswer")
- else
- play frame level & "tryAgain"
- put EMPTY into field "Entry"
- if level = 2 then
- FlipCard("number")
- go(label("level2") + 2)
- else
- if level = 3 then
- go(label("level3") + 6)
- end if
- end if
- end if
- end if
- end
-
- on ChangeLevel step
- global level, levelSpr, scene, spriteInAction, numCorrect, numCorrect4Lev2, numCorrect4Lev3, numWrong
- if (step = 1) and (level = 3) then
- exit
- end if
- repeat with i = 1 to 2
- set l to (level * 2) - 1 + (i * step)
- set the castNum of sprite levelSpr to the number of cast ("level" & l)
- playSound("crankTick", 1)
- end repeat
- if level = 2 then
- set numCorrect4Lev2 to numCorrect
- end if
- if level = 3 then
- set numCorrect4Lev3 to numCorrect
- end if
- set level to level + step
- if level = 2 then
- set numCorrect to numCorrect4Lev2
- end if
- if level = 3 then
- set numCorrect to numCorrect4Lev3
- end if
- if not integerp(numCorrect) then
- set numCorrect to 0
- end if
- set lastWrongAnswer to numCorrect
- if (scene = 2) and the castNum of sprite 17 then
- set the locH of sprite 4 to the locH of sprite 4 - 512
- set the locH of sprite 17 to the locH of sprite 17 - 512
- updateStage()
- end if
- if spriteInAction then
- set the locH of sprite spriteInAction to -256
- updateStage()
- removehider()
- grabBackground()
- turncharactersoff()
- put numChar into word gNumber of numCharacters
- end if
- clearTheDecks()
- set numWrong to 0
- end
-
- on nameCast b, e, prefix, Postfix
- set loopB to value(b)
- set loopE to value(e)
- if not stringp(Postfix) then
- set Postfix to EMPTY
- end if
- repeat with i = loopB to loopE
- set n to i - loopB + 1
- set the name of cast i to prefix & n & Postfix
- end repeat
- end
-
- on setSceneButton
- global scene, SceneSpr
- set the castNum of sprite SceneSpr to the number of cast ("Scene" & scene & "B")
- updateStage()
- end
-
- on doWait n
- global waiter, waitFlag
- set waiter to the timer + n
- set waitFlag to 1
- when mouseDown then exitWait()
- play frame "wait"
- end
-
- on exitWait
- global waitFlag
- set waitFlag to 0
- when mouseDown then nothing
- end
-
- on takeOffArrows
- global arrowSpr
- if the locH of sprite arrowSpr > 0 then
- set the locH of sprite arrowSpr to the locH of sprite arrowSpr - 512
- end if
- end
-
- on bringOnArrows
- global arrowSpr
- if the locH of sprite arrowSpr < 0 then
- set the locH of sprite arrowSpr to the locH of sprite arrowSpr + 512
- end if
- end
-
- on flipAllButOne num, arg1
- global CardSpr, extraHiderSpr
- set x to the locH of sprite CardSpr
- set y to the locV of sprite CardSpr
- set the ink of sprite extraHiderSpr to 0
- set the castNum of sprite extraHiderSpr to the number of cast ("bar" & num)
- set the locH of sprite extraHiderSpr to x
- set the locV of sprite extraHiderSpr to y
- updateStage()
- if not stringp(arg1) then
- set arg1 to EMPTY
- end if
- FlipCard(arg1)
- end
-
- on removeextrahider
- global extraHiderSpr
- set the locH of sprite extraHiderSpr to -256
- set the ink of sprite extraHiderSpr to 8
- updateStage()
- end
-
- on showBigNumber n
- global extraHiderSpr
- set the ink of sprite extraHiderSpr to 8
- set the castNum of sprite extraHiderSpr to the number of cast ("bigNum" & n)
- set the locH of sprite extraHiderSpr to 256
- set the locV of sprite extraHiderSpr to 192
- updateStage()
- end
-
- on countAnswer gobackFrame
- global answer, gName
- countCharacters()
- set n to value(answer)
- showBigNumber(n)
- playSound(string(n), 1)
- playSound(formatName(gName, n), 1)
- wait(60)
- removeextrahider()
- go(gobackFrame + 1)
- end
-
- on playNextSound
- global nextSound
- playSound(item 1 of nextSound, 0)
- put EMPTY into item 1 of nextSound
- put EMPTY into char 1 of nextSound
- if nextSound = EMPTY then
- startTimer()
- end if
- end
-
- factory theFactory
-